FROM node:lts-alpine3.13

ENV TZ=Asia/Shanghai

WORKDIR /bot

RUN set -ex \
  && sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
  && apk add --no-cache chromium tzdata \
  && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
  && rm -rf /var/cache/apk/* /tmp/* /usr/share/man
CMD [ "npm", "start" ]